﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Sharp.Domain.PlatformBoundedContext.UserModule.Aggregates;
using Sharp.Domain.Model;

namespace Sharp.Domain.PlatformBoundedContext.MessageModule.Aggregates
{
    public partial class MessageBox : AggregateRoot
    {
        public MessageBox()
        {
            //Senders = new List<User>();
            //Recipients = new List<User>();
            IsReaded = false;
            SendStatus = true;
            ReceveStatus = true;
        }
        /// <summary>
        /// 消息Id
        /// </summary>
        public Guid MessageId { get; set; }
        /// <summary>
        /// 消息
        /// </summary>
        [Required]
        public Message Message { get; set; }
        /// <summary>
        /// 发件人id
        /// </summary>
        public Guid SenderId { get; set; }
        /// <summary>
        /// 收件人Id
        /// </summary>
        public Guid ReceiverId { get; set; }
        /// <summary>
        /// 发件人
        /// </summary>
        //[ForeignKey("SenderId")]
        public User Sender { get; set; }
        /// <summary>
        /// 收件人
        /// </summary>
        //[ForeignKey("ReceiverId")]
        public User Recipient { get; set; }
        /// <summary>
        /// 是否已读
        /// </summary>
        public bool IsReaded { get; set; }
        /// <summary>
        /// 阅读时间
        /// </summary>
        public DateTime? ReadedTime { get; set; }
        /// <summary>
        /// 发件箱状态
        /// </summary>
        public bool SendStatus { get; set; }
        /// <summary>
        /// 收件箱状态
        /// </summary>
        public bool ReceveStatus { get; set; }
    }
}
